import request from "@/utils/request";

//查询规格锁绑定的模具
export function getSkuMoldBinds(skuId) {
  return request({
    url: "/diy/mb_case/sku_molds",
    params: {
      sku_id: skuId
    }
  });
}

//规格型号绑定模具
export function bindSkuMold(data) {
  return request({
    url: "/diy/mb_case/bind_sku_mold",
    method: "put",
    data: data
  });
}

export function getMoldGroup() {
  return request({
    url: "/mb_case_molds/group"
  });
}

/**
 * 添加mbCaseMold,供Admin使用
 */
export function addMbCaseMold(row) {
  return request({
    url: "/mb_case_molds",
    method: "post",
    data: row
  });
}
/**
 * 查询mbCaseMold分页,供后台使用
 */
export function getMbCaseMoldByPage(pageVo) {
  return request({
    url: "/mb_case_molds/search",
    method: "post",
    data: pageVo
  });
}
/**
 * 根据id主键获取单条记录
 */
export function getMbCaseMold(id) {
  return request({
    url: "/mb_case_molds/" + id
  });
}

/**
 * 根据主键id更新指定行的数据
 */
export function updateMbCaseMoldById(row) {
  return request({
    url: "/mb_case_molds/" + row.id,
    method: "put",
    data: row
  });
}
/**
 * // 根据id主键删除单条记录
 */
export function removeMbCaseMoldById(id) {
  return request({
    url: "/mb_case_molds/" + id,
    method: "delete"
  });
}
